package com.tx.review.exception_;

/**
 * 异常测试
 *
 * @author ：tx
 * @version:
 */
public class ExceptionDemo {
    public static void main(String[] args) {
        MyE myE = new MyE();
        try {
            myE.testThrow();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

class MyE{
    //testThrow怎么处理，throws：抛给了调用他的方法
    public void testThrow() throws Exception {
        System.out.println("进入了testThrow");
        //手动抛出异常
        throw new Exception("throw...msg");
    }
}
